@include b(transltor) {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10000;
  width: unset;
  height: unset;
  margin: unset;
  padding: unset;
  border: unset;
  outline: unset;

  @include when('dialog-wrap') {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    display: flex;
    width: 100vw;
    height: 100vh;
  }

  @include e(button) {
    display: none;
    position: absolute;
    z-index: 10000;
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    margin: unset;
    padding: unset;
    border: unset;
    box-shadow: 0 12px 20px -8px mix($primary, transparent, 80);
    cursor: pointer;
    user-select: none;

    &.__is-show {
      display: flex;
    }
  }

  @include e(loading) {
    position: fixed;
    display: flex;
    z-index: 100000;
    @include circle(26px);
    background: mix($accent, transparent, 50%);
    animation: bubble 1s ease infinite;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

    &::before {
      content: '';
      display: block;
      @include circle(12px);
      margin: auto;
      background: mix($accent, transparent, 90%);
    }
  }

  @include e(input) {
    contain: layout;
    position: fixed;
    display: flex;
    z-index: 9998;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    width: 700px;
    height: 80px;
    padding: 8px;
    padding-right: 90px;
    border-radius: 7px;
    border-bottom-left-radius: 0;
    background-color: #fff;
    background-image: url('chrome-extension://__MSG_@@extension_id__/logo.png');
    background-size: 45px;
    background-position: right 20px center;
    background-repeat: no-repeat;
    box-shadow: 3px 20px 53px -13px rgba(0,0,0,0.20);

    &::after {
      content: '输入后 ' attr(ctrl-key) ' + Enter 翻译';
      position: absolute;
      bottom: 0;
      left: 0;
      display: block;
      padding: 0 14px 5px 14px;
      transform: translateY(90%);
      background: #fff;
      font-size: 8px;
      color: #666;
      border-bottom-left-radius: 4px;
      border-bottom-right-radius: 4px;
      box-shadow: 3px 10px 13px -5px rgba(0,0,0,0.20);
    }
  }

  @include e('input-inner') {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    resize: none;
    outline: 0 none;
    border: none;
    border-radius: 6px;
    background: #F4F4F4;
    padding: 10px 20px;
    @include font-old;
    @include scroll-bar;
    font-size: 30px;
    line-height: 1.5;
    @include ts;

    @include placeholder {
      color: #d5d5d5;
    }
  }
}

@keyframes bubble {
  0% {
    transform: scale(0.7);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(0.7);
  }
}
